
/*
 * Copyright 2002-2015 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 *版权所有2002-2015原作者。
 *
 *根据Apache许可证2.0版（“许可证”）获得许可；
 *除非符合许可证，否则不得使用此文件。
 *您可以在以下地址获取许可证副本：
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 *除非适用法律要求或书面同意，软件
 *根据许可证分发的内容是按“原样”分发的，
 *无任何明示或暗示的保证或条件。
 *有关管理权限和
 *许可证下的限制。
 */

package org.springframework.aop;

import org.aopalliance.intercept.MethodInvocation;

import org.springframework.lang.Nullable;

/**
 * Extension of the AOP Alliance {@link org.aopalliance.intercept.MethodInvocation}
 * interface, allowing access to the proxy that the method invocation was made through.
 *
 * <p>Useful to be able to substitute return values with the proxy,
 * if necessary, for example if the invocation target returned itself.
 *
 * @author Juergen Hoeller
 * @author Adrian Colyer
 * @since 1.1.3
 * @see org.springframework.aop.framework.ReflectiveMethodInvocation
 * @see org.springframework.aop.support.DelegatingIntroductionInterceptor
 */
/**
 *AOP联盟的扩展｛@link.org.aopalliance.incept.MethodInvocation｝
 *接口，允许访问方法调用所通过的代理。
 *
 *＜p＞能够用代理替换返回值很有用，
 *如果需要，例如如果调用目标返回自身。
 *
 *@作者Juergen Hoeller
 *@作者Adrian Colyer
 *@自1.1.3起
 *@参见org.springframework.aop.framework.ReflectiveMethodInvocation
 *@参见org.springframework.aop.support.DelegatingIntroductionInterceptor
 */
public interface ProxyMethodInvocation extends MethodInvocation {

	/**
	 * Return the proxy that this method invocation was made through.
	 * @return the original proxy object
	 */
	/**
	 *返回此方法调用所通过的代理。
	 *@返回原始代理对象
	 */
	Object getProxy();

	/**
	 * Create a clone of this object. If cloning is done before {@code proceed()}
	 * is invoked on this object, {@code proceed()} can be invoked once per clone
	 * to invoke the joinpoint (and the rest of the advice chain) more than once.
	 * @return an invocable clone of this invocation.
	 * {@code proceed()} can be called once per clone.
	 */
	/**
	 *创建此对象的克隆。如果克隆是在｛@code proceed（）｝之前完成的
	 *在该对象上调用，｛@code proceed（）｝可以在每个克隆上调用一次
	 *多次调用连接点（以及建议链的其余部分）。
	 *@返回此调用的可调用克隆。
	 *｛@code proceed（）｝可以在每个克隆中调用一次。
	 */
	MethodInvocation invocableClone();

	/**
	 * Create a clone of this object. If cloning is done before {@code proceed()}
	 * is invoked on this object, {@code proceed()} can be invoked once per clone
	 * to invoke the joinpoint (and the rest of the advice chain) more than once.
	 * @param arguments the arguments that the cloned invocation is supposed to use,
	 * overriding the original arguments
	 * @return an invocable clone of this invocation.
	 * {@code proceed()} can be called once per clone.
	 */
	/**
	 *创建此对象的克隆。如果克隆是在｛@code proceed（）｝之前完成的
	 *在该对象上调用，｛@code proceed（）｝可以在每个克隆上调用一次
	 *多次调用连接点（以及建议链的其余部分）。
	 *@param arguments克隆调用应该使用的参数，
	 *重写原始参数
	 *@返回此调用的可调用克隆。
	 *｛@code proceed（）｝可以在每个克隆中调用一次。
	 */
	MethodInvocation invocableClone(Object... arguments);

	/**
	 * Set the arguments to be used on subsequent invocations in the any advice
	 * in this chain.
	 * @param arguments the argument array
	 */
	/**
	 *在any通知中设置要在后续调用中使用的参数
	 *在这个链条中。
	 *@param arguments参数数组
	 */
	void setArguments(Object... arguments);

	/**
	 * Add the specified user attribute with the given value to this invocation.
	 * <p>Such attributes are not used within the AOP framework itself. They are
	 * just kept as part of the invocation object, for use in special interceptors.
	 * @param key the name of the attribute
	 * @param value the value of the attribute, or {@code null} to reset it
	 */
	/**
	 *将具有给定值的指定用户属性添加到此调用。
	 *＜p＞此类属性不在AOP框架本身中使用。他们是
	 *只是作为调用对象的一部分保留，以便在特殊拦截器中使用。
	 *@param key属性的名称
	 *@param value属性的值，或｛@code null｝将其重置
	 */
	void setUserAttribute(String key, @Nullable Object value);

	/**
	 * Return the value of the specified user attribute.
	 * @param key the name of the attribute
	 * @return the value of the attribute, or {@code null} if not set
	 * @see #setUserAttribute
	 */
	/**
	 *返回指定用户属性的值。
	 *@param key属性的名称
	 *@返回属性的值，如果未设置，则返回｛@code null｝
	 *@参见#setUserAttribute
	 */
	@Nullable
	Object getUserAttribute(String key);

}
